﻿@using Dogshow.Web.ViewModels.RegistracijaNaloga
@model RegistracijaNalogaViewModel
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>Dogshow - Registracija naloga</title>
    <link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/prijava.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.7.2.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/bootstrap.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("label").addClass("control-label");
            $("input[type='text']").addClass("input-xlarge");
            $("input[type='password']").addClass("input-xlarge");
            $("#Mesto").attr("data-provide", "typeahead");
            $("form").submit(function () {
                if ($("form").validate().valid()) {
                    $(".loader").show();
                }
            });
            $.get('RegistracijaNaloga/Mesta', function(mesta) {
                $("#Mesto").typeahead({
                    source: mesta
                });
            });
            
        });
    </script>
</head>
<body>
    <div id="omotac">
        @using (Html.BeginForm("KreirajNalog", "RegistracijaNaloga", FormMethod.Post, new { @class = "form-horizontal" }))
        {
            <fieldset class="control-group">
            
                <legend><div><a href="@Url.Action("Index", "Home")"><img src="@Url.Content("~/Content/images/DogshowLogo.png")" alt="Dogshow"/></a></div><h3>Kreiranje naloga</h3></legend>
                <div class="control-group">
                    @Html.LabelFor(x => x.ImeIPrezime, "Ime i prezime: ")
                    @Html.TextBoxFor(x => x.ImeIPrezime)
                    @Html.ValidationMessageFor(x => x.ImeIPrezime)
                </div>
                <div class="control-group">
                    @Html.LabelFor(x => x.KorisnickoIme, "Korisničko ime: ")
                    @Html.TextBoxFor(x => x.KorisnickoIme)
                    @Html.ValidationMessageFor(x => x.KorisnickoIme)
                </div>
                <div class="control-group">
                    @Html.LabelFor(x => x.Lozinka, "Lozinka: ")
                    @Html.PasswordFor(x => x.Lozinka)
                    @Html.ValidationMessageFor(x => x.Lozinka)
                </div>
                <div class="control-group">
                    @Html.LabelFor(x => x.Email, "E-mail: ")
                    @Html.TextBoxFor(x => x.Email)
                    @Html.ValidationMessageFor(x => x.Email)
                </div>
                <div class="control-group">
                    @Html.LabelFor(x => x.Adresa, "Adresa: ")
                    @Html.TextBoxFor(x => x.Adresa)
                    @Html.ValidationMessageFor(x => x.Adresa)
                </div>
                <div class="control-group">
                    @Html.LabelFor(x => x.Telefon, "Telefon: ")
                    @Html.TextBoxFor(x => x.Telefon)
                    @Html.ValidationMessageFor(x => x.Telefon)
                </div>
                <div class="control-group">
                    @Html.LabelFor(x => x.Mesto, "Mesto: ")
                    @Html.TextBoxFor(x => x.Mesto)
                    @Html.ValidationMessageFor(x => x.Mesto)
                </div>
                
                <div class="control-group">
                    <input type="submit" value="Kreiraj nalog" class="btn btn-large btn-success" />
                    <img class="loader" src="@Url.Content("~/Content/images/loader.gif")" width="32" height="32"/>
                </div>
            </fieldset>
        }
    </div>
</body>
</html>
